package avicit.bdp.dms.tdm.dto;

import avicit.platform6.core.annotation.log.FieldRemark;
import avicit.platform6.core.annotation.log.PojoRemark;
import avicit.platform6.core.annotation.log.Id;
import avicit.platform6.core.annotation.log.LogField;
import avicit.platform6.core.domain.BeanDTO;
import avicit.platform6.core.properties.PlatformConstant;
import avicit.platform6.commons.utils.StringUtils;
import com.alibaba.excel.annotation.ExcelIgnoreUnannotated;
import com.alibaba.excel.annotation.ExcelProperty;
import com.alibaba.excel.annotation.format.*;
import com.alibaba.excel.annotation.write.style.ColumnWidth;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import javax.validation.constraints.*;

/**
* @金航数码科技有限责任公司
* @作者：ZiyanYan
* @邮箱：yanzy@avic.com
* @创建时间： 2024-03-19 07:56
* @类说明：数据资产需求表DTO
* @修改记录：
*/
@ApiModel(value = "BdpAssetDemandDTO", description = "数据资产需求表")
@PojoRemark(table="BDP_ASSET_DEMAND", object="BdpAssetDemandDTO", name="数据资产需求表")
@ExcelIgnoreUnannotated
public class BdpAssetDemandDTO extends BeanDTO{
    private static final long serialVersionUID = 1L;

    /**
     * 创建人姓名
     */
    private String createdName;


    /**
    * 主键
    */
    @Id
    @Size(max = 32, message = "主键长度不能超过32个字符")
    @ApiModelProperty(value = "主键", name = "id")
    @FieldRemark(column="ID", field="id", name="主键")
    private String id;

    /**
    * 需求标题
    */
    @NotBlank(message = "需求标题不能为空")
    @ExcelProperty("需求标题")
    @Size(max = 255, message = "需求标题长度不能超过255个字符")
    @ApiModelProperty(value = "需求标题", name = "demandTitle")
    @FieldRemark(column="DEMAND_TITLE", field="demandTitle", name="需求标题")
    private String demandTitle;

    /**
    * 需求描述
    */
    @NotBlank(message = "需求描述不能为空")
    @Size(max = 1000, message = "需求描述长度不能超过1000个字符")
    @ApiModelProperty(value = "需求描述", name = "demandDesc")
    @FieldRemark(column="DEMAND_DESC", field="demandDesc", name="需求描述")
    private String demandDesc;
    /**
    * 需求状态
    */
    @ExcelProperty("需求状态")
    @ColumnWidth(15)
    @NumberFormat("0")
    @Digits(integer = 10, fraction = 0, message = "需求状态格式不正确")
    @ApiModelProperty(value = "需求状态", name = "demandStatus")
    @FieldRemark(column="DEMAND_STATUS", field="demandStatus", name="需求状态")
    private Integer demandStatus;

    /**
    * 处理意见
    */
    @Size(max = 1000, message = "处理意见长度不能超过1000个字符")
    @ApiModelProperty(value = "处理意见", name = "processComment")
    @FieldRemark(column="PROCESS_COMMENT", field="processComment", name="处理意见")
    private String processComment;

    /**
    * 关联资产ID
    */
    @Size(max = 32, message = "关联资产ID长度不能超过32个字符")
    @ApiModelProperty(value = "关联资产ID", name = "assetId")
    @FieldRemark(column="ASSET_ID", field="assetId", name="关联资产ID")
    private String assetId;

    @FieldRemark(column="ASSET_TITLE", field="assetTitle", name="关联资产名称")
    private String assetTitle;

    /**
    * 资产提供方ID
    */
    @Size(max = 32, message = "资产提供方ID长度不能超过32个字符")
    @ApiModelProperty(value = "资产提供方ID", name = "assetProviderId")
    @FieldRemark(column="ASSET_PROVIDER_ID", field="assetProviderId", name="资产提供方ID")
    private String assetProviderId;

    /**
    * 创建人IP
    */
    @Size(max = 20, message = "创建人IP长度不能超过20个字符")
    @ApiModelProperty(value = "创建人IP", name = "createdIp")
    @FieldRemark(column="CREATED_IP", field="createdIp", name="创建人IP")
    private String createdIp;

    /**
    * 接收人
    */
    @Size(max = 255, message = "接收人长度不能超过255个字符")
    @ApiModelProperty(value = "接收人", name = "receivedBy")
    @FieldRemark(column="RECEIVED_BY", field="receivedBy", name="接收人")
    private String receivedBy;

    /**
     * 接收人名称
     */
    private String receivedName;

    /**
     * 是否登录
     */
    private Integer type;

    /**
    * 密级
    */
    @FieldRemark(column="SECRET_LEVEL", field="secretLevel", name="密级", dataType="lookup", lookupType="PLATFORM_FILE_SECRET_LEVEL")
    private String secretLevel;
    private String secretLevelName;

    /**
    * 创建时间起
    */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone="GMT+8")
    private java.util.Date creationDateBegin;

    /**
    * 创建时间止
    */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone="GMT+8")
    private java.util.Date creationDateEnd;

    /**
    * 最后修改时间起
    */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone="GMT+8")
    private java.util.Date lastUpdateDateBegin;

    /**
    * 最后修改时间止
    */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone="GMT+8")
    private java.util.Date lastUpdateDateEnd;

    public String getCreatedName() {
        return createdName;
    }

    public void setCreatedName(String createdName) {
        this.createdName = createdName;
    }

    public String getId(){
        return id;
    }

    public void setId(String id){
        this.id = id;
    }

    public String getDemandTitle(){
        return demandTitle;
    }

    public void setDemandTitle(String demandTitle){
        this.demandTitle = demandTitle;
    }

    public String getDemandDesc(){
        return demandDesc;
    }

    public void setDemandDesc(String demandDesc){
        this.demandDesc = demandDesc;
    }

    public Integer getDemandStatus(){
        return demandStatus;
    }

    public void setDemandStatus(Integer demandStatus){
        this.demandStatus = demandStatus;
        super.handleNullValue();
    }

    public String getProcessComment(){
        return processComment;
    }

    public void setProcessComment(String processComment){
        this.processComment = processComment;
    }

    public String getAssetId(){
        return assetId;
    }

    public void setAssetId(String assetId){
        this.assetId = assetId;
    }

    public String getAssetTitle() {
        return assetTitle;
    }

    public void setAssetTitle(String assetTitle) {
        this.assetTitle = assetTitle;
    }

    public String getAssetProviderId(){
        return assetProviderId;
    }

    public void setAssetProviderId(String assetProviderId){
        this.assetProviderId = assetProviderId;
    }

    public String getCreatedIp(){
        return createdIp;
    }

    public void setCreatedIp(String createdIp){
        this.createdIp = createdIp;
    }

    public String getReceivedBy(){
        return receivedBy;
    }

    public void setReceivedBy(String receivedBy){
        this.receivedBy = receivedBy;
    }

    public String getReceivedName() {
        return receivedName;
    }

    public void setReceivedName(String receivedName) {
        this.receivedName = receivedName;
    }

    public String getSecretLevel(){
        return secretLevel;
    }

    public void setSecretLevel(String secretLevel){
        this.secretLevel = secretLevel;
    }

    public String getSecretLevelName(){
        return secretLevelName;
    }

    public void setSecretLevelName(String secretLevelName){
        this.secretLevelName = secretLevelName;
    }

    public java.util.Date getCreationDateBegin(){
        return creationDateBegin;
    }

    public void setCreationDateBegin(java.util.Date creationDateBegin){
        this.creationDateBegin = creationDateBegin;
    }

    public java.util.Date getCreationDateEnd(){
        return creationDateEnd;
    }

    public void setCreationDateEnd(java.util.Date creationDateEnd){
        this.creationDateEnd = creationDateEnd;
    }

    public java.util.Date getLastUpdateDateBegin(){
        return lastUpdateDateBegin;
    }

    public void setLastUpdateDateBegin(java.util.Date lastUpdateDateBegin){
        this.lastUpdateDateBegin = lastUpdateDateBegin;
    }

    public java.util.Date getLastUpdateDateEnd(){
        return lastUpdateDateEnd;
    }

    public void setLastUpdateDateEnd(java.util.Date lastUpdateDateEnd){
        this.lastUpdateDateEnd = lastUpdateDateEnd;
    }

    public Integer getType() {
        return type;
    }

    public void setType(Integer type) {
        this.type = type;
    }

    @Override
    public String getLogFormName() {
        if (StringUtils.isEmpty(super.logFormName)) {
            return "资产需求管理模块";
        } else {
            return super.logFormName;
        }
    }

    @Override
    public String getLogTitle() {
        if (StringUtils.isEmpty(super.logTitle)) {
            return "资产需求管理";
        } else {
            return super.logTitle;
        }
    }

    @Override
    public PlatformConstant.LogType getLogType() {
        if (super.logType == null) {
            return PlatformConstant.LogType.module_operate;
        } else {
            return super.logType;
        }
    }
}
